#include "GameNetClient.h"

 GameNetClient::GameNetClient(int * sock, std::string &id)
    {
      this->sock=sock;
      this->id=id;
      
      /* dodajemy siebie do servera */
      (GameNetServer::getInstance())->addClient(this);
    }

 
  void GameNetClient::setSocket(int *initSock)
    {
      this->sock=initSock;
    }
  
  void GameNetClient::sendMessage(std::string &message)
    {
      /*ZDEFINIOWAC */
      
      /**
       * Klient ma wysylac informacje 'message ' na wczesniej ustawiony w konstruktorze socket sock
       * */
    }

  std::string & GameNetClient::getId()
    {
      return id;
    }
  
  void GameNetClient::setId(std::string & idToSet)
    {
      id=idToSet;
    }
  
  std::string & GameNetClient::getLastMessage()
  {
	  return last_message;
  }
  
  void GameNetClient::setLastMessage(std::string & message)
  {
	last_message = message;  
  }

  GameNetClient::~GameNetClient()
    {
      /* nothing to free*/
    }